From 967e15cc377f3351dc142b6d9d9e3266004e259a Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 22 Sep 2003 02:23:54 +0000 Subject: [PATCH] Test for errors before returning. --- gpsbabel/chkdoc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gpsbabel/chkdoc b/gpsbabel/chkdoc index 89c6aca2a..871e8f8c3 100755 --- a/gpsbabel/chkdoc +++ b/gpsbabel/chkdoc @@ -1,11 +1,23 @@ +ECODE=0 ./gpsbabel -^ | while read FMT do + export ECODE set -- $FMT TYPE=$1 - grep -q $TYPE ~/src/babelweb/capabilities.html || echo $TYPE is not documented in capabilities.html. + if ! grep -q $TYPE ~/src/babelweb/capabilities.html + then + echo $TYPE is not documented in capabilities.html. + ECODE=1 + fi - grep -qi "^ $TYPE$" README || echo $TYPE is not documented in README. + if ! grep -qi "^ $TYPE$" README + then + echo $TYPE is not documented in README. + ECODE=1 + fi done + +exit $ECODE -- 2.30.2